context.discard_from_play and context.draw_individual #931
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds two new contexts:
context.discard_from_play: Runs for each card discarded after being playedcontext.draw_individual: Runs for each card drawn from deck to handBoth contexts also run with
context.card, the card being drawn/discarded, andnum_drawn/discarded, the number of cards (including the current one) that have been drawn/discarded out of the group of cards to be drawn/discarded.context.draw_individualhas a unique argumentto_booster, which is a boolean that indicates if the card is being drawn as a result of a booster being opened.Returning
stay_flippedas a boolean will dictate whether or not a card will stay flipped on draw/discard, and returningcardareaas a string (i.e. 'discard') will change what area the card will be drawn/discarded to. Thecardareaargument gets ignored whento_boosteristrue.Additional Info: